//
//  DetailViewController.m
//  08-Homework
//
//  Created by dllo on 16/7/25.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "DetailViewController.h"
#import "Student.h"
@interface DetailViewController ()

@end

@implementation DetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
 
    UILabel *labelGender = [[UILabel alloc] initWithFrame:CGRectMake(100, 100, 100, 50)];
    labelGender.text = [NSString stringWithFormat:@"性别:%@", _stu.gender];
    labelGender.textColor = [UIColor yellowColor];
    [self.view addSubview:labelGender];
    
    UILabel *labelAge = [[UILabel alloc] initWithFrame:CGRectMake(100, 200, 100, 50)];
    labelAge.text = [NSString stringWithFormat:@"年龄:%@", [_stu.age description]];
    labelAge.textColor = [UIColor redColor];
    [self.view addSubview:labelAge];
    
    UILabel *labelPhoneNum = [[UILabel alloc] initWithFrame:CGRectMake(100, 300, 150, 50)];
    labelPhoneNum.text = [NSString stringWithFormat:@"电话:%@", _stu.phoneNumber];
    labelPhoneNum.numberOfLines = 1;
    labelPhoneNum.textColor = [UIColor lightGrayColor];
    [self.view addSubview:labelPhoneNum];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
